#ifndef EXPERIMENTPROWINDOW_H
#define EXPERIMENTPROWINDOW_H

#include <QObject>
#include <QShowEvent>
#include <QWidget>
#include <QChartView>
#include <qvalueaxis.h>
#include <qsplineseries.h>
#include <qlineseries.h>
#include <qtimer.h>
#include <qdebug.h>
#include <QRandomGenerator>
#include <QDateTimeAxis>
#include <QTime>
#include <QBarSet>
#include <QBarSeries>
#include <QBarCategoryAxis>
#include <dbHelper.h>
#include <mainwindow.h>
#include <QTimer>
#include <CommonHelper.h>
#include <tcpclient.h>
#include <CommonHelper.h>
#include <QtMath>
#include <QElapsedTimer>
#include <QMessageBox>
#include <loghelper.h>
#include <QScrollBar>
#include <QMovie>
#include <intListener.h>
#include "experimentProwindow_dialogFilter.h"
#include <serialportThread.h>

using namespace QtCharts;//不要忘记添加这一行

namespace Ui {
class experimentProWindow;
}

class experimentProWindow : public QWidget
{
    Q_OBJECT

public:
    explicit experimentProWindow(QWidget *parent = nullptr);
    ~experimentProWindow();
signals:
    void changeMainWindow();
    void changeSampleWindow();
    void changeAmplStepWindow(QString guid);

private slots:
    void on_VicCheckBox_clicked();
    void on_FamCheckBox_clicked();
    void on_RoxCheckBox_clicked();
    void on_Cy5CheckBox_clicked();
    void on_pushButton_5_clicked();
    void on_pushButton_2_clicked();
    void on_pushButton_7_clicked();
    void on_pushButton_8_clicked();
    void on_horizontalScrollBar_sliderMoved(int position);
    void on_pushButton_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_6_clicked();

    void on_selectedPosiChanged(QStringList);  // jnn-孔位筛选

private:
    void refChart();
    void changeToMainWindow();
    void refTempData();
    void stepNumChanged();
    void circleNumChanged();
    void refBarChart();
    void ref96BarChart(int,int);
    void refCurveChart();
    void expRunningTimeUpdate();

private:
    void showEvent(QShowEvent *event) override;
    Ui::experimentProWindow *ui;
    CommonHelper* commonClient;
    TcpClient * tcpClient;
    SerialportThread* serialClient;
    loghelper *logClient;
    QStringList fluorescence;//x轴
    QString cycleNum;
    int stepNum;
    QMovie *movie;
    QList<QVariantMap> barChartDataMap;
    QList<int> positionNumList;
    QString chartType;
    QTimer* expTimer;
    QTimer* tempTimer;
    QTimer *chartTimer;

    ExperimentProWindow_dialogFilter*  _dialog_filter;

};

#endif // EXPERIMENTPROWINDOW_H
